package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.IntergralPayResult;
import cn.wolfcode.domain.OperateIntergralVo;
import cn.wolfcode.feign.fallback.IntergralFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "intergral-service",fallback = IntergralFeignFallback.class)
public interface IntergralFeignApi {

    /**
     * 积分支付
     * @param intergralVo
     * @return
     */
    @PostMapping("/intergral/pay")
    Result<IntergralPayResult> pay(@RequestBody OperateIntergralVo intergralVo);

    /**
     * 积分退款
     * @param intergralVo
     * @return
     */
    @PostMapping("/intergral/refund")
    public Result<Boolean> refund(@RequestBody OperateIntergralVo intergralVo);
}
